public class Client {
    public static void main(String[] args) {
        new YeDuck("野鸭").fly();
        new WaterDuck("水鸭").fly();
        new BeijingDuck("北京鸭").fly();
        System.out.println("---------------------------");
        //可动态设置鸭子的飞行描述
        Duck duck = new YeDuck("野鸭2");
        duck.fly();
        duck.setFlyBehavior(new GoodFly());
        duck.fly();
    }
}
